﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Example_Constructors_Csharp
{
    class Rectangle
    {
        int width;
        int height;
        public Rectangle()
        {
            width = 5;
            height = 5;
        }
        public Rectangle(int a, int b)
        {
            width = a;
            height = b;
        }
        public int area()
        {
            return width * height;
        }
    }
    class Program
    {
        static void Main(string[] args)
        {
            Rectangle recta = new Rectangle();
            Rectangle rectb = new Rectangle(5, 6);
            Console.WriteLine("area recta=" + recta.area());
            Console.WriteLine("area rectb=" + rectb.area());
            recta = rectb;
            Console.WriteLine("area recta=" + recta.area());
        }
    }
}
